package com.gxa.meiye.admin.shop.service.impl;

import com.gxa.meiye.admin.shop.mapper.ShopRegisterAndLoginMapper;
import com.gxa.meiye.admin.shop.service.RegisterService;
import com.gxa.meiye.core.common.ResponseData;
import com.gxa.meiye.core.pojo.shopManagement.Shop;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author cc
 * @PackageName meiye
 * @Package com.gxa.meiye.admin.shop.service.impl
 * @Date 2022/7/20 21:38
 * @Version 1.0
 */
@Service
public class RegisterServiceImpl implements RegisterService {
    @Autowired
    private ShopRegisterAndLoginMapper shopRegisterAndLoginMapper;
    @Override
    public void addAll(Shop shop) {
       shopRegisterAndLoginMapper.saveALL(shop);
    }

    @Override
    public ResponseData checkEmail(String email) {
        ResponseData rd = new ResponseData();
        Shop shop = shopRegisterAndLoginMapper.queryByEmail(email);
        rd.setData(shop);
        return rd;
    }


}

